Higher-order perturbation ========================== You can solve for higher-order perturbation if you are in one of the following cases: #. You are using **symbolic** derivatives and those derivatives have been precomputed at parse time via the ``max_deriv_order`` option to the model factory. #. You are using **automatic** derivatives. #. You are using **numerical** derivatives. #. You are using **matlab** derivatives. And you are able to solve the generalized system of Sylvester equations. Choosing the derivatives ------------------------- To change the type of derivatives, use the option ``solve_derivatives_type``. RISE implements four types: * ``symbolic`` * ``numerical`` * ``automatic`` * ``matlab`` Solving the system of generalized Sylvester equations ------------------------------------------------------ The complicated linear problem is solved using a solver with the syntax:: [X, flag, relres, iter, resvec] = linsolver(A, b, ... TolFun, Maxiter, ... M1, M2, x0, vargs{:}); Inputs: * ``A`` -- either a square matrix or a function handle returning the result of the operation :math:`A \times x` without explicitly forming and storing :math:`A`. * ``b`` -- the right-hand side of :math:`A x = b`. * ``TolFun`` -- tolerance. * ``Maxiter`` -- maximum number of iterations. * ``M1 = []`` -- not set. * ``M2 = []`` -- not set. * ``x0`` -- initial guess. * ``vargs`` -- any additional arguments. Outputs: * ``X`` -- the final solution. * ``flag`` -- ``0`` if the problem solves; ``1`` if the maximum number of iterations is reached; another number otherwise. * ``relres`` -- the relative residual ``norm(b - A*x) / norm(b)``. * ``iter`` -- the iteration number at which the final solution was computed. * ``resvec`` -- vector of residual norms at each half iteration, including the first ``norm(b - A*x0)``. Change the default with the option ``solve_linsyst_user_algo``. Some of the algorithms usable in MATLAB: * ``'tfqmr'`` (default) * ``'bicg'`` * ``'bicgstab'`` * ``'bicgstabl'`` * ``'cgs'`` * ``'gmres'``